//
//  TabBarViewController.m
//  07-UITabBarControllerHomeWork
//
//  Created by 曹曹 on 16/7/22.
//  Copyright © 2016年 曹曹. All rights reserved.
//

#import "TabBarViewController.h"
#import "FirstPageViewController.h"
#import "MessageViewController.h"
#import "FindViewController.h"
#import "MyViewController.h"
#import "RegisterViewController.h"
#import "VertificateViewController.h"

@interface TabBarViewController ()

@end

@implementation TabBarViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    FirstPageViewController *first = [[FirstPageViewController alloc] init];
    MessageViewController *message = [[MessageViewController alloc] init];
    FindViewController *find = [[FindViewController alloc] init];
    MyViewController *my = [[MyViewController alloc] init];
    first.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"首页" image:[UIImage imageNamed:@"1"] selectedImage:nil];
    message.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"消息" image:[UIImage imageNamed:@"2"] selectedImage:nil];
    UINavigationController *navigation = [[UINavigationController alloc] initWithRootViewController:message];
    message.navigationItem.title = @"消息列表";
    find.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"发现" image:[UIImage imageNamed:@"3"] selectedImage:nil];
    my.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"我" image:[UIImage imageNamed:@"4"] selectedImage:nil];
    self.viewControllers = @[first, navigation, find, my];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
